﻿<%@ WebHandler Language="C#" Class="GetProductClass" %>

using System;
using System.Web;
using LP580.CG;

public class GetProductClass : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        System.Collections.Generic.List<clsGiftProductClass> ls = clsGiftProductClass.GetCollection(string.Format("where GiftProductUpClassID={0}", Utils.RF_int("id")));
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        foreach (clsGiftProductClass gpc in ls)
        {
            sb.AppendFormat("<option value='{0}'>{1}</option>", gpc.GiftProductClassID, gpc.GiftProductClassName);
        }
        context.Response.Write(sb.ToString());
        context.Response.End();
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}